using FitNesseRunner.Model;

namespace FitNesseRunner
{
	public abstract class RegularTableHandler : ITableHandler
	{
		private readonly string _tableName;
		public abstract void Handle(ITable table);

		protected RegularTableHandler(string tableName)
		{
			_tableName = tableName;
		}

		public bool CanHandle(ITable table)
		{
			return table.Cells.At(0, 0).Trim().ToLower() == _tableName;
		}
	}
}